import request from '@/utils/request'

// 查询公共基础字段列表
export function listCommonObjectProperty(query) {
  return request({
    url: '/system/commonObjectProperty/list',
    method: 'get',
    params: query
  })
}

// 查询公共基础字段详细
export function getCommonObjectProperty(id) {
  return request({
    url: '/system/commonObjectProperty/' + id,
    method: 'get'
  })
}

// 新增公共基础字段
export function addCommonObjectProperty(data) {
  return request({
    url: '/system/commonObjectProperty',
    method: 'post',
    data: data
  })
}

// 新增字段判重
export function commonAddRemovingRepeat(nameEn) {
  return request({
    url: '/system/commonObjectProperty/commonAddRemovingRepeat/'+nameEn,
    method: 'get'
  })
}

// 修改公共基础字段
export function updateCommonObjectProperty(data) {
  return request({
    url: '/system/commonObjectProperty',
    method: 'put',
    data: data
  })
}

// 删除公共基础字段
export function delCommonObjectProperty(id) {
  return request({
    url: '/system/commonObjectProperty/' + id,
    method: 'delete'
  })
}

// 导出公共基础字段
export function exportCommonObjectProperty(query) {
  return request({
    url: '/system/commonObjectProperty/export',
    method: 'get',
    params: query
  })
}
